<template>
  <Card v-for="(item, index) in cart.list" :key="index" :item="item" :index="index"></Card>
  <van-submit-bar style="margin-bottom: 50px" :price="cart.totalPrice * 100" button-text="提交订单">
    <van-checkbox :modelValue="cart.checkAllState" @click="cart.toggleCheckAllState">全选</van-checkbox>
  </van-submit-bar>
</template>

<script lang="ts" setup>
import Card from '@/components/card.vue';
import { useCartStore } from '@/stores/cart';

const cart = useCartStore();
</script>

<style lang="scss" scoped></style>
